﻿
@{
    Layout = null;
    var message = TempData["Message"];
}

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>表单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="~/Content/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="~/Content/css/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="~/Content/font-awesome-4.7.0/css/font-awesome.min.css">
</head>

<body>
    <div style="margin: 15px;">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>表单集合</legend>
        </fieldset>
        <form action="/Stock/Idsync" class="layui-form" method="post">
            @Html.AntiForgeryToken()
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">根据商品Id同步库存</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入Id,如果有多个Id请用;隔开" name="ProductIds" class="layui-textarea" lay-verify="required"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="demo1">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <script type="text/javascript" src="~/Content/layui/layui.js"></script>
    <script>
        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form(),
                layer = layui.layer,
                layedit = layui.layedit,
                laydate = layui.laydate;

                @if (message != null)
                {
                    <text>
                        layer.msg('@Html.Raw(message)');
                    </text>
                 }

                    //监听提交
                    form.on('submit(demo1)', function (data) {
                        var loading = layer.msg('数据同步中', { icon: 16, shade: 0.3, time: 0 });
                    });
                });

    </script>
</body>

</html>